<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>站内信 - Powered by shoppingl</title>
<meta name="keywords" content="$!config.keywords" />
<meta name="description" content="$!config.description" />
<meta name="generator" content="shopping 2.0" />
<meta name="author" content="www.shopping.com">
<meta name="copyright" content="shopping Inc. All Rights Reserved">
<link href="$!webPath/resources/style/system/front/default/css/public.css" type="text/css" rel="stylesheet" />
<link href="$!webPath/resources/style/system/front/default/css/user.css" type="text/css" rel="stylesheet" />
<script src="$!webPath/resources/js/jquery-1.6.2.js"></script>
<script src="$!webPath/resources/js/jquery.validate.min.js"></script>
<script>
jQuery(document).ready(function(){
  jQuery("#theForm").validate({
     rules: {
			users:{
			     required:true
			    },
			 content:{
			    required:true
			 }
			},
     messages: {
			users:{
			    required: "收件人不能为空"	   
			  },
			content:{
			    required:"短信内容不能为空"
				}
		  },
  submitHandler:function(){
	   var users=jQuery("#users").val();
       if(users!=""){
       jQuery.post("$!webPath/message_validate_user.htm",{"users":users},function(data){
           if(data!=""){
	          jQuery("#users").after("<label class='error' for='users' generated='true'>"+data+" is not exist</label>");
		   }else{
			  var content=jQuery("#content").val();
		      jQuery.post("$!webPath/buyer/message_save.htm",{"users":users,"content":content},function(data){
			    if(data=="true"){
				  window.location.href="$!webPath/buyer/message_success.htm";
				}
			  },"text");
		   }
        },"text");  
      }  
	}		  
  }); 
});
</script>
</head>
<body>
$!httpInclude.include("/top.htm")
<div class="main"> 
$!httpInclude.include("/buyer/head.htm")
  
  <div class="user_center">
    <table width="1000" border="0" cellspacing="0" cellpadding="0" class="user_table">
      <tr>
        $!httpInclude.include("/buyer/account_nav.htm?op=message")
        <td id="centerbg" valign="top">
        <div class="buyer_position"><div class="buyer_p_box"><a href="$!webPath/seller/index.htm">买家中心</a> > <span>发送站内短信</span></div></div>
        <div class="productmain">
            <div class="ordernav">
              <ul class="orderul">
                <li><a href="$!webPath/buyer/message.htm">收到消息（<strong class="red">$!{user_msgs.size()}</strong>）</a></li>
                <li><a href='$!webPath/buyer/message.htm?from_user_id=$!user.id' class="other">已发送消息</a><a href='$!webPath/buyer/sended_message.htm' class="other"></a></li>
                <li><a href="$!webPath/buyer/message.htm?type=0">系统消息（<strong class="red">$!{sys_msgs.size()}</strong>）</a></li>
                <li class="this">发送短信</li>
              </ul>
            </div>
            <div class="ordercon">
              <div class="addnav">
			  <form action="$!webPath/buyer/message_save.htm" method="post" name="theForm" id="theForm">
                <table width="705" border="0" cellspacing="0" cellpadding="0" class="addnavtable">
                  <tr>
                    <td width="100" rowspan="2" align="right" valign="top"><span class="red">*</span>收件人：</td>
                    <td class="px10 message"><input name="users" type="text" id="users" style="height:25px;" value="$!userName" size="40" /></td>
                  </tr>
                  <tr>
                    <td class="px10 message">多个收件人用逗号分开</td>
                  </tr>
                  
                  <tr>
                    <td align="right" valign="top"><span class="red">*</span>内容：</td>
                    <td class="px10">
                      <textarea name="content" id="content" cols="45" rows="6" style="width:400px;"></textarea>                    </td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td class="px10"><span class="setsub">
                      <input name="提交" type="submit"  value="发送"  style="cursor:pointer;"/>
                      </span></td>
                  </tr>
                </table>
				</form>
              </div>
            </div>
          </div></td>
      </tr>
    </table>
  </div>
   $!httpInclude.include("/footer.htm")
</div>
</body>
</html>